package com.xbongbong.saas.service;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.pro.supplierproduct.pojo.SupplierProductDeleteBatchDTO;
import com.xbongbong.saas.domain.entity.SupplierProductEntity;

import java.util.List;
import java.util.Map;
/**
 * 供应商产品
 * @author Jian.Wang
 * @date 2019/1/23 20:27
 * @since v1.0
 * @version v1.0
 */
public interface SupplierProductService {
   /**
    * 插入数据
    *
    * @param  entity 实体
    * @author Jian.Wang
    * @since v1.0
    * @throws XbbException 异常
    * @return Integer 返回值
    */
    Integer insert(Object entity) throws XbbException;
    /**
     * 更新数据
     *
     * @param  entity 实体
     * @author Jian.Wang
     * @since v1.0
     * @throws XbbException 异常
     * @return Integer 返回值
     */
    Integer update(Object entity) throws XbbException;

    /**
     * 多条件查询
     * @author Jian.Wang
     * @since v1.0
     * @param param 参数
     * @return List<SupplierProductEntity> 供应商产品集合
     */
    List<SupplierProductEntity> findEntitys(Map<String, Object> param);
    /**
     * 查询数据条数
     * @author Jian.Wang
     * @since v1.0
     * @param param 参数
     * @return Integer 数据条数
     */
    Integer getEntitysCount(Map<String, Object> param);

     /**
      * 通过supplierId删除数据
      * @param supplierProductDeleteBatchDTO
      * @throws XbbException
      */
     void deleteBySupplierId(SupplierProductDeleteBatchDTO supplierProductDeleteBatchDTO) throws XbbException;

    void delBySupplierIdAndId(Long supplierId, Long productSubId, String corpid);
}
